<template>
	<view class="">
		<!-- 商品坪林 -->
		<view class="row" v-for='(row,i) in list' :key='i'>
			<view class="top_role">
				<view class="left">
					<image :src="row.avatar" mode=""></image>
					<view class="name">
						{{row.users_name}}
					</view>
				</view>
				<view class="right">
					{{row.created_at}}
				</view>
			</view>
			<view class="info" v-if="row.content">
				{{row.content}}
			</view>
			<block v-if='row.img_arr && row.img_arr.length > 0'>
				<view class="img_box" >
					<image class="image" @click="$global.onPreview(img)" v-for="(img,im) in row.img_arr" :key='im' :src="img" mode="scaleToFill"></image>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			list:{
				type:Array,
				dafault:()=>[]
			},
			type:{
				type:String,
				default:'commodity',//commodity,statistics
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			
		},
		onLoad(params){
			
		}
	}
</script>

<style lang="scss" scoped>
	.row{
		padding: 40rpx 0 40rpx;
		border-bottom: 2rpx solid #f6f7fb;
		.top_role{
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 100%;
			.left{
				width: calc(100% - 180rpx);
				display: flex;
				justify-content: space-between;
				align-items: center;
				image{
					width: 80rpx;
					height: 80rpx;
					border-radius: 50%;
				}
				.name{
					width: calc(100% - 100rpx);
					font-size: 28rpx;
					line-height: 44rpx;
					font-weight: 700;
				}
			}.right{
				width: 160rpx;
				text-align: right;
				font-size: 28rpx;
				line-height: 40rpx;
				color:#ADADAD
			}
		}
		.info{
			margin-top: 16rpx;
			line-height: 44rpx;
			font-size: 32rpx;
			color:#26252A
		}
		.img_box{
			margin-top: 24rpx;
			flex-wrap: wrap;
			display: flex;
			.image{
				width: 214rpx;
				height: 214rpx;
				margin:0 16rpx 18rpx 0 ;
				&:nth-child(3n){
					margin-right:0 ;
				}
			}
		}
	}
	
</style>
